<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/js/jquery-1.9.1.js"></script>
<!-- 分页插件 -->
<link href="<%=request.getContextPath()%>/HRTWEB/css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/js/jqPaginator.js"></script>
<script src="<%=request.getContextPath()%>/HRTWEB/js/bootstrap/bootstrap.min.js"></script>
<!-- 公共 -->
<%@include file="../publicJSCSS.jsp"%>
<!-- 现在 -->
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/HRTWEB/commentPage/commentPage.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/HRTWEB/css/publicCss.css">	
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/js/commentPage.js"></script>
<!-- 评论 -->
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/commentPage/commentStars.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/commentPage/comment.js"></script>

<title>评论</title>

</head>
<body>
	<!-- 头部 -->
	<%@include file="../head.jsp"%>
	<!-- 中部 -->
	<div id="commentDiv">
		<div class="m-t-xx" id="mainMyOrder" style="border: 1px dashed #CCC;">
			<!-- 中部一个礼品 -->
			<form id="comments" method="post" name="comments">
				<input type="hidden" id="num" value="${num }"  />
				<c:if test="${num==1}">
					<div>
						<%int j = 0; %>
						<c:forEach items="${commGiftDetails}" var="cGiftDetail">
							<!--中部 的 头部-->
							<div id="commmentDetail">
								<table>
									<tr>
										<td id="commmentDetailLeft">
										<input type="hidden" name="gdeId" id="gdeId_<%=j %>" value="${cGiftDetail.id}"/>
										<!-- 订单详情id -->
										<input type="hidden" name="orderId" id="orderId" value="${cGiftDetail.orderDetailId}"/>
										<img src="<%=request.getContextPath()%>/HRTWEB/images/23/${cGiftDetail.pic}" width="300px" />
										</td>
										<td id="commmentDetailRight">
											<table border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td colspan="2">
														<input type="hidden" name="gdeName" id="gdeName" value="${cGiftDetail.giftName}"/>
														<span class="titleSpan">
															${cGiftDetail.giftName}
														</span>
													</td>
			
												</tr>
												<tr>
													<td>价格</td>
													<td><span style="color: #FF0000;font-size: 27px;font-weight: bold;">${cGiftDetail.salePrice}</span>元</td>
												</tr>
												<tr>
													<td>配送</td>
													<td>快递：0.00</td>
												</tr>
												<tr>
													<td>月销量</td>
													<td><font color="#FF0000" size="1">100</font>件</td>
												</tr>
												<tr>
													<td>评价</td>
													<td>4.8分(累计评论&nbsp;21&nbsp;)</td>
												</tr>
												<tr>
													<td colspan="2">
														<div class="contextDiv">
															<p>现在查看的是您所购买商品的信息于2015年5月19日下单购买了此商品</p>
														</div>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</div>
						
							<!-- 评价 -->
							<div style="width: 100%;clear:both;" class="m-t-xx">
								<div style="width: 48%;" class="divLeft">
									<div id="divHidde">
										<span style="vertical-align: top; padding-left: 20px;">商品评价： </span>
										<span class="m-l-xx">
											<textarea rows="10" cols="40" id="content" name="content"></textarea>
										</span>
										<div id="commentsImgDiv">
					                     	<a href="#" style="cursor:hand;">
					                     		<!-- <input type="button" class="subbtn" value="晒晒宝贝图片" /> -->
					                     		<button class="subbtn">晒晒宝贝图片</button>
					                     	</a>
					                    </div>
									</div>
								</div>
								
								<div style="width: 400px;" class="divLeft">
									<div id="ratinga" objId="a" style="clear:both;height:30px;">
								          <span style=" float:left;">礼品规格评价：</span>
									       <div id="rating-stara" style="float:left;" class="rating-star">
									            <a href="javascript::">0</a>
									            <a href="javascript::">1</a>
									            <a href="javascript::">2</a>
									            <a href="javascript::">3</a>
									            <a href="javascript::">4</a>
									        </div>
									       	<div id="contentDetAll_<%=j %>">
									       		<!-- 匿名 -->
									       		<input type="hidden" name="anonymous" id="anonymous_<%=j %>" />
												<input type="hidden" name="contentDet" id="contentDet_<%=j %>"/>
										        <div id="c_a" style="float:left;" class="comment-font"></div>
									       	</div>
									</div>
									<div id="ratingb" objId="b" style="clear:both;height:30px;" class="m-t-x">
						               <span style="float:left;" class="m-l-xx">物流评价：</span>
								       <div id="rating-starb" style=" float:left;" class="rating-star">
								            <a href="javascript::">0</a>
								            <a href="javascript::">1</a>
								            <a href="javascript::">2</a>
								            <a href="javascript::">3</a>
								            <a href="javascript::">4</a>
								        </div>
								        <div id="logisticsAll">
											<input type="hidden" name="logistics" id="logistics_<%=j %>"/>
									        <div id="c_b" style="float:left;" class="comment-font"></div>
								        </div>
								   </div>
							       <div id="ratingc" objId="c" style="clear:both;height:30px;" class="m-t-x">
						               <span style="float:left;" class="m-l-xx">客服评论：</span>
								       <div id="rating-starc" style=" float:left;" class="rating-star">
								            <a href="javascript::">0</a>
								            <a href="javascript::">1</a>
								            <a href="javascript::">2</a>
								            <a href="javascript::">3</a>
								            <a href="javascript::">4</a>
								        </div>
								        <div id="servicerCommAll">
									        <input type="hidden" name="servicerComm" id="servicerComm_<%=j %>"/>
									        <div id="c_c" style="float:left;" class="comment-font"></div>
								        </div>
								    </div>     
								</div>
							</div>
							<%j++; %>
						</c:forEach>
					</div>
				</c:if>
				
				
				<!-- 中部多个礼品评论 -->
				<c:if test="${num>1}">
					<div style="clear: both; width: 100%;">
						<!-- 多礼品的礼品规格评价 -->
						<div id="commmentDetail">
				        	<table style="width: 100%;">
				        		<% int i=0; %>
				                <c:forEach items="${commGiftDetails}" var="commGifList">
					                <tr>
					                	<td style="padding-right: 10px;">
					                		<input type="hidden" name="gdeId" id="gdeId_<%=i %>" value="${commGifList.id}"/>
					                		<img src="<%=request.getContextPath()%>/HRTWEB/images/23/${commGifList.pic}" width="200px" />
					                	</td>
					                    <td>
					                    	<div>
					                        	<p class="contextDivP">
					                        		<input type="hidden" name="gdeName" id="gdeName" value="${commGifList.giftName}"/>
					                        		${commGifList.giftName}
					                        	</p>
					                            <p><font color="#FF0000" size="+1">${commGifList.salePrice}</font>元</p>
					                            <p>4.8分(累计评论&nbsp;21&nbsp;)</p>
					                            <p>4.8分${commGifList.orderDetailId}</p>
					                        </div>
					                    </td>
					                    <td width="45%">
					                    	<div id="rating${commGifList.orderDetailId}" objId="${commGifList.orderDetailId}" style="clear:both;">
								               <span style="float:left;" class="m-l-x">礼品规格评价：</span>
										       <div id="rating-star${commGifList.orderDetailId}" style=" float:left;" class="rating-star">
										            <a href="javascript::">0</a>
										            <a href="javascript::">1</a>
										            <a href="javascript::">2</a>
										            <a href="javascript::">3</a>
										            <a href="javascript::">4</a>
										        </div>
												<!-- 订单详情id -->
												<input type="hidden" name="orderId" id="orderId" value="${commGifList.orderDetailId}"/>
												
												<div id="contentDetAll_<%=i %>">
													<input type="hidden" name="contentDet" id="contentDet_<%=i %>"/>
													<input type="hidden" name="logistics" id="logistics_<%=i %>"/>
													<input type="hidden" name="servicerComm" id="servicerComm_<%=i %>"/>
													<input type="hidden" name="anonymous" id="anonymous_<%=i %>" />
											        <div id="c_${commGifList.orderDetailId}" style="float:left;" class="comment-font"></div>
								       			</div>
										   </div>
					                        <div id="divHidde">
												<textarea rows="8" cols="50" id="content" name="content"></textarea>
												<div>
							                     	<a href="#" style="cursor:hand;">
								                     	<input type="button" class="subbtn" value="晒晒宝贝图片" />
							                     	</a>
							                    </div>
											</div>  
					                    </td>
					                </tr>
					                <% i++; %>
				                </c:forEach>
				            </table>
				        </div>
				        <div style="float:right;width:45%; text-align: left;margin-top: 10px;">
						   <div id="ratingd" objId="d" style="clear:both;height:30px;">
				               <span style="float:left;" class="m-l-x">物流评价：</span>
						       <div id="rating-stard" style=" float:left;" class="rating-star">
						            <a href="javascript::">0</a>
						            <a href="javascript::">1</a>
						            <a href="javascript::">2</a>
						            <a href="javascript::">3</a>
						            <a href="javascript::">4</a>
						        </div>
								<div id="logisticsAll">
						        	<div id="c_d" style="float:left;" class="comment-font"></div>
						        </div>
						   </div>
		             
				           <div id="ratinge" objId="e" style="clear:both;height:30px;" class="m-t-x">
				               <span style="float:left;" class="m-l-x">客服评价：</span>
						       <div id="rating-stare" style=" float:left;" class="rating-star">
						            <a href="javascript::">0</a>
						            <a href="javascript::">1</a>
						            <a href="javascript::">2</a>
						            <a href="javascript::">3</a>
						            <a href="javascript::">4</a>
						        </div>
						        <div id="servicerCommAll">
						        	<div id="c_e" style="float:left;" class="comment-font"></div>
						        </div>
							</div>
						</div><br/>
					</div>
				</c:if>
				<div style="width: 100%; " class="m-b-x">
					<div id="commBtn" class="m-t-xx m-b-x" >
						<span class="divLeft">
							<input type="checkBox" id="anonymous" value="1" checked="checked"/>匿名评论
						</span>
						<button type="submit" class="sumbit-btn" id="submitBtn">发表评论</button>
					</div>
				</div>
			</form>
			<!-- 中下部 -->
			<div style="width: 100%;" class="m-b-x">
				
				<div id="commAllAdd">
					<span><input type="radio" name="chiceComment" id="allComment" checked="checked" value="1">全部评论</span> 
					<span><input type="radio" name="chiceComment" id="pictureComment" value="2">追加评论</span>
					<span><input type="radio" name="chiceComment" id="rateComment" value="3">图片</span>
					<div class="divRight">
						<span><input type="checkBox" checked="checked"
							name="haveContent" id="haveContent" />有内容</span> <span><select
							id="selected">
								<option selected="selected" value="0">默认排序</option>
								<option value="2">时间排序</option>
								<option value="3">追加排序</option>
						</select></span>
					</div>
				</div>
				<div class="m-t-x m-b-x">
					<table id="commentList" class="comment-table" cellpadding="0" cellspacing="0">
						<c:forEach items="${pageResult.resultList}" var="commAll">
							<tr >
								<td>初次评论:
									<div style="line-height: 10px; font-size: 12px;">5-05</div>
								</td>
								<td>${commAll.content}
									<div style="width: 20px; line-height: 20px; text-align: cneter;">
										<img
											src="<%=request.getContextPath()%>/HRTWEB/images/stars-all.gif" />
									</div>
								</td>
								<td>
									<c:if test="${commAll.anonymous==1}">
										匿名
									</c:if>
									<c:if test="${commAll.anonymous==0}">
										公开
									</c:if>
								</td>
							</tr>
						</c:forEach>
					</table>
					
				</div>
				
				<!-- 分页 -->
				<div style="text-align: center;">
					<ul class="pagination" id="pagination2"></ul>
				</div>
				<div style="text-align: center;">
					<div id="pageResult">
						<input id="pageCount" type="hidden" value="${pageResult.pageCount}" />
						<input id="totalCount" type="hidden" value="${pageResult.totalCount}" />
						<input id="pageIndex" type="hidden" value="${pageResult.pageIndex}" />
						<input id="pageSize" type="hidden" value="${pageResult.pageSize}" />
					</div>
				</div>
			</div>
		</div>
	</div>
	<br />
	<div id="footer" class="footer" style="clear: both;">
		<%@include file="../foot.jsp"%>
	</div>
</body>
</html>